From: Florian Müllner Date: Wed, 19 Apr 2023 10:54:17 +0000 (+0200) Subject: mpris: Fall back to app icon first X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~337^2~2^2~82 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=27617ef0a3187dc47669a889eea20f9396c7f3c5;p=gnome-shell.git mpris: Fall back to app icon first When no cover art is available, the app icon at least allows distinguishing between different players, so try falling back to that before using the generic icon name. Part-of: --- diff --git a/js/ui/mpris.js b/js/ui/mpris.js index 93d1ec68b..2ccd0c44b 100644 --- a/js/ui/mpris.js +++ b/js/ui/mpris.js @@ -70,6 +70,9 @@ class MediaMessage extends MessageList.Message { let file = Gio.File.new_for_uri(this._player.trackCoverUrl); this._icon.gicon = new Gio.FileIcon({ file }); this._icon.remove_style_class_name('fallback'); + } else if (this._player.app) { + this._icon.gicon = this._player.app.icon; + this._icon.add_style_class_name('fallback'); } else { this._icon.icon_name = 'audio-x-generic-symbolic'; this._icon.add_style_class_name('fallback');